﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

    /// <summary>
    /// 实体类TB_Notice 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public class TB_Notice : Entity
    {
        public TB_Notice() : base("TB_Notice") { _NoticeID = Guid.NewGuid().ToString(); }

        #region Model
        private string _NoticeID;
        private string _SignUpID;
        private string _NoticeType;
        private string _NoticeTitle;
        private string _Message;
        private string _IsRead;
        private DateTime? _CreateTime;
        private string _IsActive;
        private int _ReadCount;
        /// <summary>
        /// 
        /// </summary>
        public string NoticeID
        {
            get { return _NoticeID; }
            set
            {
                this.OnPropertyValueChange(_.NoticeID, _NoticeID, value);
                this._NoticeID = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string SignUpID
        {
            get { return _SignUpID; }
            set
            {
                this.OnPropertyValueChange(_.SignUpID, _SignUpID, value);
                this._SignUpID = value;
            }
        }
        /// <summary>
        /// 目前默认1
        /// </summary>
        public string NoticeType
        {
            get { return _NoticeType; }
            set
            {
                this.OnPropertyValueChange(_.NoticeType, _NoticeType, value);
                this._NoticeType = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string NoticeTitle
        {
            get { return _NoticeTitle; }
            set
            {
                this.OnPropertyValueChange(_.NoticeTitle, _NoticeTitle, value);
                this._NoticeTitle = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string Message
        {
            get { return _Message; }
            set
            {
                this.OnPropertyValueChange(_.Message, _Message, value);
                this._Message = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string IsRead
        {
            get { return _IsRead; }
            set
            {
                this.OnPropertyValueChange(_.IsRead, _IsRead, value);
                this._IsRead = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public DateTime? CreateTime
        {
            get { return _CreateTime; }
            set
            {
                this.OnPropertyValueChange(_.CreateTime, _CreateTime, value);
                this._CreateTime = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public string IsActive
        {
            get { return _IsActive; }
            set
            {
                this.OnPropertyValueChange(_.IsActive, _IsActive, value);
                this._IsActive = value;
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public int ReadCount
        {
            get { return _ReadCount; }
            set
            {
                this.OnPropertyValueChange(_.ReadCount, _ReadCount, value);
                this._ReadCount = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.NoticeID};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.NoticeID,
				_.SignUpID,
				_.NoticeType,
				_.NoticeTitle,
				_.Message,
				_.IsRead,
				_.CreateTime,
				_.IsActive,
				_.ReadCount};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._NoticeID,
				this._SignUpID,
				this._NoticeType,
				this._NoticeTitle,
				this._Message,
				this._IsRead,
				this._CreateTime,
				this._IsActive,
				this._ReadCount};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._NoticeID = DataUtils.ConvertValue<string>(reader["NoticeID"]);
            this._SignUpID = DataUtils.ConvertValue<string>(reader["SignUpID"]);
            this._NoticeType = DataUtils.ConvertValue<string>(reader["NoticeType"]);
            this._NoticeTitle = DataUtils.ConvertValue<string>(reader["NoticeTitle"]);
            this._Message = DataUtils.ConvertValue<string>(reader["Message"]);
            this._IsRead = DataUtils.ConvertValue<string>(reader["IsRead"]);
            this._CreateTime = DataUtils.ConvertValue<DateTime?>(reader["CreateTime"]);
            this._IsActive = DataUtils.ConvertValue<string>(reader["IsActive"]);
            this._ReadCount = DataUtils.ConvertValue<int>(reader["ReadCount"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._NoticeID = DataUtils.ConvertValue<string>(row["NoticeID"]);
            this._SignUpID = DataUtils.ConvertValue<string>(row["SignUpID"]);
            this._NoticeType = DataUtils.ConvertValue<string>(row["NoticeType"]);
            this._NoticeTitle = DataUtils.ConvertValue<string>(row["NoticeTitle"]);
            this._Message = DataUtils.ConvertValue<string>(row["Message"]);
            this._IsRead = DataUtils.ConvertValue<string>(row["IsRead"]);
            this._CreateTime = DataUtils.ConvertValue<DateTime?>(row["CreateTime"]);
            this._IsActive = DataUtils.ConvertValue<string>(row["IsActive"]);
            this._ReadCount = DataUtils.ConvertValue<int>(row["ReadCount"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_Notice");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field NoticeID = new Field("NoticeID", "TB_Notice", "NoticeID");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field SignUpID = new Field("SignUpID", "TB_Notice", "SignUpID");
            /// <summary>
            /// 目前默认1
            /// </summary>
            public readonly static Field NoticeType = new Field("NoticeType", "TB_Notice", "目前默认1");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field NoticeTitle = new Field("NoticeTitle", "TB_Notice", "NoticeTitle");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field Message = new Field("Message", "TB_Notice", "Message");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field IsRead = new Field("IsRead", "TB_Notice", "IsRead");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field CreateTime = new Field("CreateTime", "TB_Notice", "CreateTime");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field IsActive = new Field("IsActive", "TB_Notice", "IsActive");
            /// <summary>
            /// 
            /// </summary>
            public readonly static Field ReadCount = new Field("ReadCount", "TB_Notice", "ReadCount");
        }
        #endregion


    }
}

